package eerbaar.v2.effects.internal;

public class TimeLineStrategy {

    private final Force force;
    private final CanvasPosition start;

    public TimeLineStrategy(Force force, CanvasPosition start) {
        this.force = force;
        this.start = start;
    }

    public CanvasPosition calc(int age) {

        final double startX = this.start.getX();
        final double startY = this.start.getY();

        double deltaX = (this.force.getX() * age);
        double deltaY = (this.force.getY() * age);

        double endX = deltaX + startX;
        double endY = deltaY + startY;

        return new CanvasPosition(endX, endY);
    }

}
